import { PROJECT, SETPROJECT, UPDATEPROJECT } from './api';
import { METHOD, request } from '@/utils/request';

//获取项目列表
export async function projectsList(params) {
  return request(PROJECT, METHOD.GET, params);
}
//设置默认项目
export async function setProject(params) {
  return request(SETPROJECT, METHOD.POST, params);
}
//新增项目
export async function addProject(params) {
  return request(PROJECT, METHOD.POST, params);
}
//更新项目
export async function updateProject(params) {
  return request(UPDATEPROJECT, METHOD.PUT, params);
}
// 根据项目id 获取项目
export async function getProjectByID(params) {
  return request(PROJECT + '/getProjectById', METHOD.GET, params);
}

export default {
  projectsList,
  setProject,
  addProject,
  updateProject,
  getProjectByID,
};
